package com.pasabahceambalaj.entity;

// Generated Oct 8, 2013 12:01:41 AM by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;

/**
 * Firma generated by hbm2java
 */
@Entity
@Table(name = "firma", catalog = "ambalaj", uniqueConstraints = @UniqueConstraint(columnNames = "kod"))
public class Firma implements java.io.Serializable {

	private Long id;
	private int version;
	private String kod;
	private String ad;
	private Long vergino;
	private Long mersisno;
	private String adres;
	private String telefon;
	private String webadresi;
	private String eposta;
	private Set<Isemir> isemirs = new HashSet<Isemir>(0);
	private Set<Kullanici> kullanicis = new HashSet<Kullanici>(0);
	private Set<Rol> rols = new HashSet<Rol>(0);
	private Set<Urun> uruns = new HashSet<Urun>(0);
	private Set<Kalip> kalips = new HashSet<Kalip>(0);
	private Set<Malzeme> malzemes = new HashSet<Malzeme>(0);

	public Firma() {
	}

	public Firma(String kod, String ad) {
		this.kod = kod;
		this.ad = ad;
	}

	public Firma(String kod, String ad, Long vergino, Long mersisno, String adres, String telefon, String webadresi, String eposta, Set<Isemir> isemirs, Set<Kullanici> kullanicis, Set<Rol> rols, Set<Urun> uruns, Set<Kalip> kalips, Set<Malzeme> malzemes) {
		this.kod = kod;
		this.ad = ad;
		this.vergino = vergino;
		this.mersisno = mersisno;
		this.adres = adres;
		this.telefon = telefon;
		this.webadresi = webadresi;
		this.eposta = eposta;
		this.isemirs = isemirs;
		this.kullanicis = kullanicis;
		this.rols = rols;
		this.uruns = uruns;
		this.kalips = kalips;
		this.malzemes = malzemes;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Version
	@Column(name = "version", nullable = false)
	public int getVersion() {
		return this.version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	@Column(name = "kod", unique = true, nullable = false)
	@NotNull
	public String getKod() {
		return this.kod;
	}

	public void setKod(String kod) {
		this.kod = kod;
	}

	@Column(name = "ad", nullable = false, length = 1000)
	@NotNull
	@Length(max = 1000)
	public String getAd() {
		return this.ad;
	}

	public void setAd(String ad) {
		this.ad = ad;
	}

	@Column(name = "vergino")
	public Long getVergino() {
		return this.vergino;
	}

	public void setVergino(Long vergino) {
		this.vergino = vergino;
	}

	@Column(name = "mersisno")
	public Long getMersisno() {
		return this.mersisno;
	}

	public void setMersisno(Long mersisno) {
		this.mersisno = mersisno;
	}

	@Column(name = "adres", length = 1000)
	@Length(max = 1000)
	public String getAdres() {
		return this.adres;
	}

	public void setAdres(String adres) {
		this.adres = adres;
	}

	@Column(name = "telefon", length = 13)
	@Length(max = 13)
	public String getTelefon() {
		return this.telefon;
	}

	public void setTelefon(String telefon) {
		this.telefon = telefon;
	}

	@Column(name = "webadresi", length = 100)
	@Length(max = 100)
	public String getWebadresi() {
		return this.webadresi;
	}

	public void setWebadresi(String webadresi) {
		this.webadresi = webadresi;
	}

	@Column(name = "eposta", length = 100)
	@Length(max = 100)
	public String getEposta() {
		return this.eposta;
	}

	public void setEposta(String eposta) {
		this.eposta = eposta;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "firma")
	public Set<Isemir> getIsemirs() {
		return this.isemirs;
	}

	public void setIsemirs(Set<Isemir> isemirs) {
		this.isemirs = isemirs;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "firma")
	public Set<Kullanici> getKullanicis() {
		return this.kullanicis;
	}

	public void setKullanicis(Set<Kullanici> kullanicis) {
		this.kullanicis = kullanicis;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "firma")
	public Set<Rol> getRols() {
		return this.rols;
	}

	public void setRols(Set<Rol> rols) {
		this.rols = rols;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "firma")
	public Set<Urun> getUruns() {
		return this.uruns;
	}

	public void setUruns(Set<Urun> uruns) {
		this.uruns = uruns;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "firma")
	public Set<Kalip> getKalips() {
		return this.kalips;
	}

	public void setKalips(Set<Kalip> kalips) {
		this.kalips = kalips;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "firma")
	public Set<Malzeme> getMalzemes() {
		return this.malzemes;
	}

	public void setMalzemes(Set<Malzeme> malzemes) {
		this.malzemes = malzemes;
	}

}
